package com.tt.service;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.query.Query;
import org.springframework.stereotype.Service;
import com.tt.dao.CommunityDaoImpl;
import com.tt.entity.Question;
import com.tt.entity.Reply;

@Service
public class CommunityServiceImpl {
	@Resource
	private CommunityDaoImpl cDaoImpl;
	public boolean addQuestion(Question question,int uid){
		int addQuestion = cDaoImpl.addQuestion(question, uid);
		if (addQuestion>0) {
			return true;
		}
		return false;
	}
	public List<Question> findAllQuestion(){
		
		return cDaoImpl.findAllQuestion();
	}
	public boolean addReply(int id,Reply reply,int uid){
		return this.cDaoImpl.addReply(id, reply,uid);
	}
}
